create external table jms_dm.dm_end_sender_report_detail_dt 
(
input_time                                              timestamp COMMENT '订单录入时间' ,
waybill_id                                              string COMMENT '运单号' ,
order_source_code                                       string COMMENT '订单来源code' ,
order_source_name                                       string COMMENT '订单来源名称' ,
order_status_code                                       string COMMENT '订单状态code' ,
real_pick_network_code                                  string COMMENT '实际取件网点code' ,
real_pick_network_name                                  string COMMENT '实际取件网点名称' ,
pick_time                                               timestamp COMMENT '取件时间' ,
best_pick_time_end                                      string COMMENT '最佳取件结束时间' ,
cancel_time                                             timestamp COMMENT '订单取消时间' ,
on_code string COMMENT '订单取消原因编号' ,
on string COMMENT '取消订单原因' ,
business_name                     string COMMENT '品牌' ,
post_site_code                                          string COMMENT '门店编码' ,
post_site_name                    string COMMENT '门店name' ,
post_site_address                                       string COMMENT '门店地址' ,
customer_code                                           string COMMENT '客户编号code' ,
customer_name                                           string COMMENT '客户编号名称' ,
pick_regional_code           string COMMENT '取件_大区code' ,
pick_regional_name           string COMMENT '取件_大区name' ,
pick_agent_code              string COMMENT '取件_代理区编码' ,
pick_agent_name              string COMMENT '取件_代理区名称' ,
pick_fran_code               string COMMENT '取件_加盟商' ,
pick_fran_name               string COMMENT '取件_加盟商' ,
pick_network_code                                       string COMMENT '取件网点code' ,
pick_network_name                                       string COMMENT '取件网点名称' ,
sender_province_id                                      string COMMENT '寄件省份id' ,
sender_province_name                                    string COMMENT '寄件省份' ,
sender_city_id                                          string COMMENT '寄件城市id' ,
sender_city_name                                        string COMMENT '寄件城市' ,
sender_area_id                                          string COMMENT '寄件区域id' ,
sender_area_name                                        string COMMENT '寄件区域' ,
sender_detailed_address                                 string COMMENT '寄件详细地址' ,
receiver_province_id                                    string COMMENT '收件省份id' ,
receiver_province_name                                  string COMMENT '收件省份' ,
receiver_city_id                                        string COMMENT '收件城市id' ,
receiver_city_name                                      string COMMENT '收件城市' ,
receiver_area_id                                        string COMMENT '收件区域id' ,
receiver_area_name                                      string COMMENT '收件区域' ,
receiver_detailed_address                               string COMMENT '收件详细地址' ,
category_id string COMMENT '' ,
date_time                                               timestamp COMMENT '分区' ,
dt                                                      string COMMENT '分区' )
comment 'insert overwrite table jms_dm.dm_end_sender_report_detail_dt partition(dt)'
PARTITIONED BY ( dt string COMMENT '时间分区')
stored as parquet
LOCATION '/dw/hive/jms_dm.db/external/dm_end_sender_report_detail_dt'
TBLPROPERTIES (     'discover.partitions' = 'false',  'parquet.column.index.access' = 'true');
